package com.cari.oa.domain;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.validator.constraints.Length;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * 
* Title: SoftProjectEntity
* Description:软件项目实体
* Company: cari 
* @author    hjx 
* @date       2013-1-16
 */
@Entity
@Table(name = "T_SOFTPROJECT")
public class SoftProjectEntity implements Serializable {

    private static final long serialVersionUID = 8775225809962095596L;

    /**
     * 项目ID
     */
    @Id
    @Length(max = 32)
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
    private String id;

    /**
     * 项目名称
     */
    @NotNull(message = "名称不能为空")
    @Length(max = 200, message = "名称长度要小于200个字符")
    private String name;

    /**
     * 客户名称
     */
    @NotNull(message = "客户名称不能为空")
    @Length(max = 100, message = "客户名称长度要小于100个字符")
    @Column(name = "consumer")
    private String consumer;
    
    @NotNull(message = "项目经理不能为空")
	@Column(name = "project_manager")
    private String projectManager;
    
	
    @Column(name = "version")
    @Length(max = 100, message = "版本名称长度要小于100个字符")
    private String version;

    /**
     * 项目状态
     */
    @NotNull(message = "状态不能为空")
    @Column(name = "status")
    private String status;
    
    /**
     * 项目描述
     */
    @Column(name = "description")
    @Length(max = 1000, message = "描述信息长度要小于1000个字符")
    private String description;
    
    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime = new Date();
    
    @Column(name = "MANAGER_CNNAME")
    private String cnName;

    public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getConsumer() {
		return consumer;
	}

	public void setConsumer(String consumer) {
		this.consumer = consumer;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getProjectManager() {
		return projectManager;
	}

	public void setProjectManager(String projectManager) {
		this.projectManager = projectManager;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public String getCnName() {
		return cnName;
	}

	public void setCnName(String cnName) {
		this.cnName = cnName;
	}
}
